package outline;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JSeparator;

public class J05_HelloSwingMenu extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					J05_HelloSwingMenu frame = new J05_HelloSwingMenu();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public J05_HelloSwingMenu() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		
		JMenuBar menuBar = new JMenuBar();
		setJMenuBar(menuBar);
		
		JMenu mnNewMenu = new JMenu("File(F)");
		menuBar.add(mnNewMenu);
		
		JMenuItem mntmNew = new JMenuItem("New");
		mnNewMenu.add(mntmNew);
		
		JSeparator separator = new JSeparator();
		mnNewMenu.add(separator);
		
		JMenuItem mntmOpen = new JMenuItem("Open");
		mnNewMenu.add(mntmOpen);
		
		JSeparator separator_1 = new JSeparator();
		mnNewMenu.add(separator_1);
		
		JMenuItem mntmClose = new JMenuItem("Close");
		mnNewMenu.add(mntmClose);
		
		JMenu mnNewMenu_1 = new JMenu("Edit(E)");
		menuBar.add(mnNewMenu_1);
		
		JMenuItem mntmDelet = new JMenuItem("Delete");
		mnNewMenu_1.add(mntmDelet);
		
		JMenu mnNewMenu_2 = new JMenu("view(V)");
		menuBar.add(mnNewMenu_2);
		
		JMenuItem mntmView = new JMenuItem("View");
		mnNewMenu_2.add(mntmView);
		
		JMenu mnNewMenu_3 = new JMenu("Tool(T)");
		menuBar.add(mnNewMenu_3);
		
		JMenuItem mntmTool = new JMenuItem("Tool");
		mnNewMenu_3.add(mntmTool);
		
		JMenu mnNewMenu_4 = new JMenu("Window(W)");
		menuBar.add(mnNewMenu_4);
		
		JMenuItem mntmPreference = new JMenuItem("Preference");
		mnNewMenu_4.add(mntmPreference);
		
		JMenu mnNewMenu_5 = new JMenu("Help(H)");
		menuBar.add(mnNewMenu_5);
		
		JMenuItem mntmSearch = new JMenuItem("search");
		mnNewMenu_5.add(mntmSearch);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
	}

}
